package com.yudean.esb.dao.mds;

import com.yudean.esb.domain.mds.MdsFinPerformanceData;
import com.yudean.esb.mapper.mds.MdsFinPerformanceDataMapper;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository("mdsERPFinPerformanceDataDao")
@Scope("prototype")
public class MdsERPFinPerformanceDataDao {
    @Resource
    private MdsFinPerformanceDataMapper mdsFinPerformanceDataMapper;


    public List<MdsFinPerformanceData> getFinPerformanceData(String compCode,
                                                             String periodName,
                                                             String performanceCode,
                                                             String viewName) {
        List<MdsFinPerformanceData> list = mdsFinPerformanceDataMapper.getFinPerformanceData(compCode, periodName, performanceCode, viewName);
        if (list == null || list.size() < 1) {
            return null;
        }
        return list;
    }
    public List<MdsFinPerformanceData> getFinPerformanceDataByHYPCode(String hypCode, String periodName, String performanceCode, String viewName) {
        List<MdsFinPerformanceData> list = mdsFinPerformanceDataMapper.getFinPerformanceDataByHYPCode(hypCode, periodName, performanceCode, viewName);
        if (list == null || list.size() < 1) {
            return null;
        }
        return list;
    }

    public List<MdsFinPerformanceData> getHypFinPerformanceDataByPeriodName(String periodName) {
        List<MdsFinPerformanceData> list = mdsFinPerformanceDataMapper.getHypFinPerformanceDataByPeriodName(periodName);
        if (list == null || list.size() < 1) {
            return null;
        }
        return list;
    }

    public List<MdsFinPerformanceData> getHypFinPerformanceDataByPeriodNamePageSize(String periodName, int rowStart, int rowEnd) {
        List<MdsFinPerformanceData> list = mdsFinPerformanceDataMapper.getHypFinPerformanceDataByPeriodNamePageSize(periodName, rowStart, rowEnd);
        if (list == null || list.size() < 1) {
            return null;
        }
        return list;
    }

    public int getAllHypFinPerformanceDataByPeriodNameCount(String periodName) {
        return mdsFinPerformanceDataMapper.getAllHypFinPerformanceDataByPeriodNameCount(periodName);
    }


}
